package leecode

func sumZero(n int) []int {
	index := 1
	result := make([]int, 0, n)
	if n%2 != 0 {
		result = append(result, 0)
	}
	for n > len(result) {
		result = append(result, index)
		result = append(result, -index)
		index++
	}
	return result
}
